package cn.ys.org.mapper;

import cn.ys.org.domain.Department;
import cn.ys.org.query.DepartmentQuery;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DepartmentMapper {
    // 查询所有
    // @Select("SELECT * FROM t_department")
    List<Department> findAll();
    // 查询一个
    Department findById(Long id);
    // 新增
    void add(Department department);
    // 修改
    void update(Department department);
    // 删除
    void delete(Long id);
    // 分页查询 -- 数据
    List<Department> queryByPage(DepartmentQuery query);
    // 分页查询 -- 条数
    Integer queryByCount(DepartmentQuery query);
    // 批量删除
    void piDeleteById(List<Long> ids);
}
